docs(test-filters): add migration callout for --filter → --treenode-filter#5628
Merged
thomhurst merged 1 commit intothomhurst:mainfrom Apr 19, 2026
Merged
Conversation
…ilter Adds a tip callout at the top of the existing test filters page to signpost the VSTest → Microsoft.Testing.Platform filter syntax change for users migrating from xUnit / NUnit / MSTest. Includes a small mapping table with the three most common --filter shapes. Motivation: `dotnet test --filter "Category=X"` is silently rejected on MTP (help printed, "Zero tests ran"). Looks like a test failure when it's just an unrecognised flag. Easy to miss that --treenode-filter is the replacement until you stumble on this page. Single-file docs-only change. The existing filter examples below the callout already cover the destination syntax comprehensively.
Up to standards ✅🟢 Issues
|
Contributor
Author
|
One alternative we considered but deliberately kept out of this PR: teaching the test runner to detect Not included here because it's a bigger surface (likely Microsoft.Testing.Platform-level CLI parsing rather than TUnit itself) and docs felt like the right first step. Flagging it in case it's worth an upstream conversation. |
Owner
|
Thanks! |
This was referenced Apr 20, 2026
Merged
This was referenced Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small docs-only change. Adds a tip callout to the top of the existing test filters page so users coming from xUnit / NUnit / MSTest find the
--filter→--treenode-filtermapping before they go looking for it.Why
VSTest's
dotnet test --filter "Category=X"is familiar to anyone migrating. On Microsoft.Testing.Platform the flag is silently rejected, the MTP help is printed, and the run exits withZero tests ran. It looks like a test failure when it's actually just an unrecognised flag — I hit this myself running an AI dev agent against a TUnit project (the agent spent ~11 minutes trying filter variations before giving up). Easy signposting seemed like the lightest-weight fix.Scope
Single file:
docs/docs/execution/test-filters.md. One callout block plus a three-row mapping table, links back into the existing filter examples that already cover the destination syntax comprehensively. Nothing else touched.Alternatives considered
xunit.md,nunit.md,mstest.md). They currently focus on code syntax rather than CLI, so one central callout felt lighter than three duplicate ones.Love TUnit — using it heavily on a new project. Thanks for building it.